package cn.tedu.bean;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

public class BeanTest {
    public static void main(String[] args) {
        //启动Spring，然后创建Spring容器对象
        AnnotationConfigApplicationContext acac = new AnnotationConfigApplicationContext(ConfigBean.class);
        List list1 = acac.getBean("list", List.class);
        List list2 = acac.getBean("mobilePhone", List.class);
        Person person = acac.getBean("person", Person.class);
        System.out.println(list1);
        System.out.println(list2);
        System.out.println(person);
    }
}
